package com.itcs.jpa;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @ClassName: Sort
 * @Description: TODO
 * @author CHEN-HF
 * @date 2017年12月14日 下午7:39:25
 * 
 */
public class Sort extends org.springframework.data.domain.Sort {

	private static final long serialVersionUID = -361019140263314410L;

	public Sort(Order[] orders) {
		super(orders);
	}

	public Sort(List<Order> orders) {
		super(orders);
	}

	public Sort(String[] properties) {
		super(DEFAULT_DIRECTION, properties);
	}

	public Sort(boolean ascending, String[] properties) {
		super(ascending ? Direction.ASC : Direction.DESC,
				properties == null ? new ArrayList() : Arrays.asList(properties));
	}

	public Sort(boolean ascending, List<String> properties) {
		super(ascending ? Direction.ASC : Direction.DESC, properties);
	}
}
